package org.zhs.a_11_内部类.迭代器;

/**
 * @Author: zhs
 * @Date: 2024/9/11 20:30
 * @Version: 1.0
 * @Description:
 */
public class Main {

    public static void main(String[] args) {
        Sequence sequence = new Sequence(10);
        for (int i = 0; i < 10; i++) {
            sequence.add(i);
        }

        Selector selector = sequence.selector();
        while (!selector.end()){
            System.out.println(selector.current() + " ");
            selector.next();
        }
    }

}
